package com.pshcp.domain.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 在线咨询会话
 * </p>
 *
 * @author auto generator
 * @since 2022-12-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table(name = "t_online_session")
public class OnlineSession implements Serializable {

    private static final long serialVersionUID=1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 0专家问诊 1医生发起的联系
     */
    private Integer type;

    private Long patientOnlineOrderId;

    /**
     * 医生ID
     */
    private Long doctorId;

    /**
     * 医生名称
     */
    private String doctorName;

    /**
     * 患者id
     */
    private Long patientUserId;

    /**
     * 患者id
     */
    private Long patientId;

    /**
     * 患者名称
     */
    private String patientName;

    /**
     * 1文字消息 2图片消息 4 音频消息
     */
    private Integer lastMsgType;

    /**
     * 最近一次消息内容
     */
    private String lastMsgContent;

    /**
     * 会话id
     */
    private String sessionId;

    /**
     * 开始时间
     */
    private Long beginTime;

    /**
     * 结束时间
     */
    private Long endTime;

    /**
     * 会话状态：0待接诊 1接诊中 2已完成 3取消
     */
    private Integer sessionStatus;
    private Long patientUnReadCount;
    private Long doctorUnReadCount;
    private Integer patientDelStatus;
    private Integer doctorDelStatus;
    /**
     * 状态 0正常 1删除
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 更新时间
     */
    private Date updateTime;

}
